//notes: "head" refers to the son


#delimit ;
*  PSID DATA CENTER *****************************************************
   JOBID            : 288858                            
   DATA_DOMAIN      : IND                               
   USER_WHERE       : NULL                              
   FILE_TYPE        : All Individuals Data              
   OUTPUT_DATA_TYPE : ASCII                             
   STATEMENTS       : do                                
   CODEBOOK_TYPE    : PDF                               
   N_OF_VARIABLES   : 310                               
   N_OF_OBSERVATIONS: 77221                             
   MAX_REC_LENGTH   : 564                               
   DATE & TIME      : February 18, 2021 @ 14:56:33
*************************************************************************
;

infix
      ER30000              1 - 1           ER30001              2 - 5           ER30002              6 - 8     
      V1                   9 - 9           V311                10 - 11          V362                12 - 12    
      V363                13 - 13          ER30003             14 - 14          V441                15 - 15    
      V787                16 - 17          V877                18 - 18          V878                19 - 19    
      ER30020             20 - 23          ER30021             24 - 25          ER30022             26 - 26    
      V1101               27 - 27          V1477               28 - 29          V1573               30 - 30    
      V1574               31 - 31          V1576               32 - 32          ER30043             33 - 36    
      ER30044             37 - 38          ER30045             39 - 39          V1801               40 - 40    
      V2189               41 - 42          V2285               43 - 43          V2286               44 - 44    
      V2288               45 - 45          ER30067             46 - 49          ER30068             50 - 51    
      ER30069             52 - 52          V2401               53 - 53          V2815               54 - 55    
      V2912               56 - 56          V2913               57 - 57          ER30091             58 - 61    
      ER30092             62 - 63          ER30093             64 - 64          V3001               65 - 65    
      V3233               66 - 67          V3280               68 - 68          V3281               69 - 69    
      V3283               70 - 70          ER30117             71 - 74          ER30118             75 - 76    
      ER30119             77 - 77          V3401               78 - 78          V3655               79 - 80    
      V3700               81 - 81          V3701               82 - 82          V3703               83 - 83    
      ER30138             84 - 87          ER30139             88 - 89          ER30140             90 - 90    
      V3801               91 - 91          V4131               92 - 93          V4179               94 - 94    
      V4180               95 - 95          V4182               96 - 96          ER30160             97 - 100   
      ER30161            101 - 102         ER30162            103 - 103         V4301              104 - 104   
      V4674              105 - 106         V5055              107 - 107         V5056              108 - 108   
      V5058              109 - 109         ER30188            110 - 113         ER30189            114 - 115   
      ER30190            116 - 116         V5201              117 - 117         V5594              118 - 119   
      V5634              120 - 120         V5635              121 - 121         V5637              122 - 122   
      ER30217            123 - 126         ER30218            127 - 128         ER30219            129 - 129   
      V5701              130 - 130         V6143              131 - 132         V6181              133 - 133   
      V6182              134 - 134         V6184              135 - 135         ER30246            136 - 139   
      ER30247            140 - 141         ER30248            142 - 142         V6301              143 - 143   
      V6740              144 - 145         V6774              146 - 146         V6775              147 - 147   
      V6777              148 - 148         ER30283            149 - 152         ER30284            153 - 154   
      ER30285            155 - 155         V6901              156 - 156         V7373              157 - 158   
      V7420              159 - 159         V7421              160 - 160         V7423              161 - 161   
      ER30313            162 - 165         ER30314            166 - 167         ER30315            168 - 168   
      V7501              169 - 169         V8025              170 - 171         V8072              172 - 172   
      V8073              173 - 173         V8075              174 - 174         ER30343            175 - 178   
      ER30344            179 - 180         ER30345            181 - 181         V8201              182 - 182   
      V8649              183 - 184         V8696              185 - 185         V8697              186 - 186   
      V8699              187 - 187         ER30373            188 - 191         ER30374            192 - 193   
      ER30375            194 - 194         V8801              195 - 195         V9335              196 - 197   
      V9382              198 - 198         V9383              199 - 199         V9385              200 - 200   
      ER30399            201 - 204         ER30400            205 - 206         ER30401            207 - 208   
      V10001             209 - 209         V10982             210 - 211         V11029             212 - 212   
      V11030             213 - 213         V11032             214 - 214         ER30429            215 - 218   
      ER30430            219 - 220         ER30431            221 - 222         V11101             223 - 223   
      V11915             224 - 225         V12383             226 - 226         V12384             227 - 227   
      V12386             228 - 228         ER30463            229 - 232         ER30464            233 - 234   
      ER30465            235 - 236         V12501             237 - 237         V13534             238 - 239   
      V13542             240 - 241         V13635             242 - 242         V13636             243 - 243   
      ER30498            244 - 247         ER30499            248 - 249         ER30500            250 - 251   
      V13701             252 - 252         V14581             253 - 254         V14589             255 - 256   
      V14682             257 - 257         V14683             258 - 258         ER30535            259 - 262   
      ER30536            263 - 264         ER30537            265 - 266         V14801             267 - 267   
      V16055             268 - 269         V16063             270 - 271         V16156             272 - 272   
      V16157             273 - 273         ER30570            274 - 277         ER30571            278 - 279   
      ER30572            280 - 281         V16301             282 - 282         V17452             283 - 284   
      V17460             285 - 286         V17542             287 - 287         V17543             288 - 288   
      ER30606            289 - 292         ER30607            293 - 294         ER30608            295 - 296   
      V17701             297 - 297         V18783             298 - 299         V18791             300 - 301   
      V18893             302 - 302         V18894             303 - 303         ER30642            304 - 308   
      ER30643            309 - 310         ER30644            311 - 312         V19001             313 - 313   
      V20083             314 - 315         V20091             316 - 317         V20193             318 - 318   
      V20194             319 - 319         ER30689            320 - 323         ER30690            324 - 325   
      ER30691            326 - 327         V20301             328 - 328         V21389             329 - 330   
      V21397             331 - 332         V21499             333 - 333         V21500             334 - 334   
      ER30733            335 - 338         ER30734            339 - 340         ER30735            341 - 342   
      V21601             343 - 343         V23246             344 - 345         V23254             346 - 347   
      V23331             348 - 348         V23332             349 - 349         ER30806            350 - 354   
      ER30807            355 - 356         ER30808            357 - 358         ER2001             359 - 359   
      ER3917A            360 - 361         ER3919A            362 - 363         ER4157C            364 - 364   
      ER4157D            365 - 365         ER33101            366 - 370         ER33102            371 - 372   
      ER33103            373 - 374         ER5001             375 - 375         ER6787A            376 - 377   
      ER6789A            378 - 379         ER6997C            380 - 380         ER6997D            381 - 381   
      ER33201            382 - 386         ER33202            387 - 388         ER33203            389 - 390   
      ER7001             391 - 391         ER9033A            392 - 393         ER9035A            394 - 395   
      ER9248C            396 - 396         ER9248D            397 - 397         ER33301            398 - 401   
      ER33302            402 - 403         ER33303            404 - 405         ER10001            406 - 406   
      ER11814            407 - 408         ER11842            409 - 410         ER12221C           411 - 411   
      ER12221D           412 - 412         ER33401            413 - 417         ER33402            418 - 419   
      ER33403            420 - 421         ER13001            422 - 422         ER15892            423 - 424   
      ER15922            425 - 426         ER16431A           427 - 427         ER16431B           428 - 428   
      ER33501            429 - 433         ER33502            434 - 435         ER33503            436 - 437   
      ER17001            438 - 438         ER19953            439 - 440         ER19983            441 - 442   
      ER20377A           443 - 443         ER20377B           444 - 444         ER33601            445 - 448   
      ER33602            449 - 450         ER33603            451 - 452         ER21001            453 - 453   
      ER23390            454 - 455         ER23420            456 - 457         ER24146            458 - 458   
      ER24147            459 - 459         ER33701            460 - 464         ER33702            465 - 466   
      ER33703            467 - 468         ER25001            469 - 469         ER27354            470 - 471   
      ER27386            472 - 473         ER28045            474 - 474         ER28046            475 - 475   
      ER33801            476 - 480         ER33802            481 - 482         ER33803            483 - 484   
      ER36001            485 - 485         ER40529            486 - 487         ER40561            488 - 489   
      ER41035            490 - 490         ER41036            491 - 491         ER33901            492 - 496   
      ER33902            497 - 498         ER33903            499 - 500         ER42001            501 - 501   
      ER46506            502 - 503         ER46538            504 - 505         ER46977            506 - 506   
      ER46978            507 - 507         ER34001            508 - 512         ER34002            513 - 514   
      ER34003            515 - 516         ER47301            517 - 517         ER51867            518 - 519   
      ER51899            520 - 521         ER52401            522 - 522         ER52402            523 - 523   
      ER34101            524 - 528         ER34102            529 - 530         ER34103            531 - 532   
      ER53001            533 - 533         ER57620            534 - 535         ER57654            536 - 537   
      ER58219            538 - 538         ER58220            539 - 539         ER34201            540 - 544   
      ER34202            545 - 546         ER34203            547 - 548         ER60001            549 - 549   
      ER64771            550 - 551         ER64805            552 - 553         ER65455            554 - 554   
      ER65456            555 - 555         ER34301            556 - 560         ER34302            561 - 562   
      ER34303            563 - 564   
using ./RawData/geovars_clean.txt, clear 
;
label variable ER30000         "RELEASE NUMBER"                           ;
label variable ER30001         "1968 INTERVIEW NUMBER"                    ;
label variable ER30002         "PERSON NUMBER                         68" ;
label variable V1              "RELEASE NUMBER"                           ;
label variable V311            "WHERE H GREW UP"                          ;
label variable V362            "REGION GREW UP"                           ;
label variable V363            "GEO. MOBILITY"                            ;
label variable ER30003         "RELATIONSHIP TO HEAD                  68" ;
label variable V441            "RELEASE NUMBER"                           ;
label variable V787            "STATE H GREW UP"                          ;
label variable V877            "REGION GREW UP"                           ;
label variable V878            "GEOGRAPHCL MOBILITY"                      ;
label variable ER30020         "1969 INTERVIEW NUMBER"                    ;
label variable ER30021         "SEQUENCE NUMBER                       69" ;
label variable ER30022         "RELATIONSHIP TO HEAD                  69" ;
label variable V1101           "RELEASE NUMBER"                           ;
label variable V1477           "STATE H GREW UP"                          ;
label variable V1573           "REGION GREW UP"                           ;
label variable V1574           "RGN FATHER GREW UP"                       ;
label variable V1576           "GEOGRAPHIC MOBILITY"                      ;
label variable ER30043         "1970 INTERVIEW NUMBER"                    ;
label variable ER30044         "SEQUENCE NUMBER                       70" ;
label variable ER30045         "RELATIONSHIP TO HEAD                  70" ;
label variable V1801           "RELEASE NUMBER"                           ;
label variable V2189           "STATE HD GREW UP"                         ;
label variable V2285           "REGN HD GREW UP"                          ;
label variable V2286           "REGN DAD GREW UP"                         ;
label variable V2288           "GEOGRAPHIC MOBILITY"                      ;
label variable ER30067         "1971 INTERVIEW NUMBER"                    ;
label variable ER30068         "SEQUENCE NUMBER                       71" ;
label variable ER30069         "RELATIONSHIP TO HEAD                  71" ;
label variable V2401           "RELEASE NUMBER"                           ;
label variable V2815           "STATE HD GREW UP"                         ;
label variable V2912           "REGN HD GREW UP"                          ;
label variable V2913           "REGN DAD GREW UP"                         ;
label variable ER30091         "1972 INTERVIEW NUMBER"                    ;
label variable ER30092         "SEQUENCE NUMBER                       72" ;
label variable ER30093         "RELATIONSHIP TO HEAD                  72" ;
label variable V3001           "RELEASE NUMBER"                           ;
label variable V3233           "ST GREW UP-HD"                            ;
label variable V3280           "REGION HD GREW UP"                        ;
label variable V3281           "REGION DAD GREW UP"                       ;
label variable V3283           "GEOGRAPH MOBILITY"                        ;
label variable ER30117         "1973 INTERVIEW NUMBER"                    ;
label variable ER30118         "SEQUENCE NUMBER                       73" ;
label variable ER30119         "RELATIONSHIP TO HEAD                  73" ;
label variable V3401           "RELEASE NUMBER"                           ;
label variable V3655           "ST GREW UP-HD"                            ;
label variable V3700           "REGION HD GREW UP"                        ;
label variable V3701           "REGION DAD GREW UP"                       ;
label variable V3703           "GEOGRAPH MOBILITY"                        ;
label variable ER30138         "1974 INTERVIEW NUMBER"                    ;
label variable ER30139         "SEQUENCE NUMBER                       74" ;
label variable ER30140         "RELATIONSHIP TO HEAD                  74" ;
label variable V3801           "RELEASE NUMBER"                           ;
label variable V4131           "ST HD GREW UP"                            ;
label variable V4179           "REGION HD GREW UP"                        ;
label variable V4180           "REGION DAD GREW UP"                       ;
label variable V4182           "GEOGRAPH MOBILITY"                        ;
label variable ER30160         "1975 INTERVIEW NUMBER"                    ;
label variable ER30161         "SEQUENCE NUMBER                       75" ;
label variable ER30162         "RELATIONSHIP TO HEAD                  75" ;
label variable V4301           "RELEASE NUMBER"                           ;
label variable V4674           "STATE HD GREW UP  K14K15"                 ;
label variable V5055           "REGION HD GREW UP"                        ;
label variable V5056           "REGION DAD GREW UP"                       ;
label variable V5058           "GEOGRAPHIC MOBILITY"                      ;
label variable ER30188         "1976 INTERVIEW NUMBER"                    ;
label variable ER30189         "SEQUENCE NUMBER                       76" ;
label variable ER30190         "RELATIONSHIP TO HEAD                  76" ;
label variable V5201           "RELEASE NUMBER"                           ;
label variable V5594           "ST GREW UP-HD    K14-K15"                 ;
label variable V5634           "REGION 77 HD GRW UP 6-16"                 ;
label variable V5635           "REGION FTHR 77 HD GRW UP"                 ;
label variable V5637           "GEOGRAPHIC MOBILITY"                      ;
label variable ER30217         "1977 INTERVIEW NUMBER"                    ;
label variable ER30218         "SEQUENCE NUMBER                       77" ;
label variable ER30219         "RELATIONSHIP TO HEAD                  77" ;
label variable V5701           "RELEASE NUMBER"                           ;
label variable V6143           "K14,15 ST GREW UP-HD"                     ;
label variable V6181           "REGION 78 HD GREW UP"                     ;
label variable V6182           "REGION 78 HD FA GREW UP"                  ;
label variable V6184           "GEOGRAPHIC MOBILITY"                      ;
label variable ER30246         "1978 INTERVIEW NUMBER"                    ;
label variable ER30247         "SEQUENCE NUMBER                       78" ;
label variable ER30248         "RELATIONSHIP TO HEAD                  78" ;
label variable V6301           "RELEASE NUMBER"                           ;
label variable V6740           "M14,15 ST GREW UP-HD"                     ;
label variable V6774           "REGION 79 HD GREW UP"                     ;
label variable V6775           "REGION 79 HD FA GREW UP"                  ;
label variable V6777           "GEOGRAPHIC MOBILITY"                      ;
label variable ER30283         "1979 INTERVIEW NUMBER"                    ;
label variable ER30284         "SEQUENCE NUMBER                       79" ;
label variable ER30285         "RELATIONSHIP TO HEAD                  79" ;
label variable V6901           "RELEASE NUMBER"                           ;
label variable V7373           "M14,15 ST GREW UP-HD"                     ;
label variable V7420           "REGION 80 HD GREW UP"                     ;
label variable V7421           "REGION 80 HD FA GREW UP"                  ;
label variable V7423           "GEOGRAPHIC MOBILITY"                      ;
label variable ER30313         "1980 INTERVIEW NUMBER"                    ;
label variable ER30314         "SEQUENCE NUMBER                       80" ;
label variable ER30315         "RELATIONSHIP TO HEAD                  80" ;
label variable V7501           "RELEASE NUMBER"                           ;
label variable V8025           "M14-15 STATE GREW UP-HD"                  ;
label variable V8072           "REGION 81 HD GREW UP"                     ;
label variable V8073           "REGION 81 HD FA GREW UP"                  ;
label variable V8075           "GEOGRAPHIC MOBILITY"                      ;
label variable ER30343         "1981 INTERVIEW NUMBER"                    ;
label variable ER30344         "SEQUENCE NUMBER                       81" ;
label variable ER30345         "RELATIONSHIP TO HEAD                  81" ;
label variable V8201           "RELEASE NUMBER"                           ;
label variable V8649           "M14-15 STATE GREW UP-HD"                  ;
label variable V8696           "REGION 82 HD GREW UP"                     ;
label variable V8697           "REGION 82 HD FA GREW UP"                  ;
label variable V8699           "GEOGRAPHIC MOBILITY"                      ;
label variable ER30373         "1982 INTERVIEW NUMBER"                    ;
label variable ER30374         "SEQUENCE NUMBER                       82" ;
label variable ER30375         "RELATIONSHIP TO HEAD                  82" ;
label variable V8801           "RELEASE NUMBER"                           ;
label variable V9335           "M14-15 STATE GREW UP-HD"                  ;
label variable V9382           "REGION 83 HD GREW UP"                     ;
label variable V9383           "REGION 83 HD FA GREW UP"                  ;
label variable V9385           "GEOGRAPHIC MOBILITY"                      ;
label variable ER30399         "1983 INTERVIEW NUMBER"                    ;
label variable ER30400         "SEQUENCE NUMBER                       83" ;
label variable ER30401         "RELATIONSHIP TO HEAD                  83" ;
label variable V10001          "RELEASE NUMBER"                           ;
label variable V10982          "M14-15 STATE GREW UP-HD"                  ;
label variable V11029          "REGION 84 HD GREW UP"                     ;
label variable V11030          "REGION 84 HD FA GREW UP"                  ;
label variable V11032          "GEOGRAPHIC MOBILITY"                      ;
label variable ER30429         "1984 INTERVIEW NUMBER"                    ;
label variable ER30430         "SEQUENCE NUMBER                       84" ;
label variable ER30431         "RELATIONSHIP TO HEAD                  84" ;
label variable V11101          "RELEASE NUMBER"                           ;
label variable V11915          "G8-9 STATE GREW UP-HD"                    ;
label variable V12383          "REGION 85 HD GREW UP"                     ;
label variable V12384          "REGION 85 HD FA GREW UP"                  ;
label variable V12386          "HEAD GEOGRAPHIC MOBILITY"                 ;
label variable ER30463         "1985 INTERVIEW NUMBER"                    ;
label variable ER30464         "SEQUENCE NUMBER                       85" ;
label variable ER30465         "RELATIONSHIP TO HEAD                  85" ;
label variable V12501          "RELEASE NUMBER"                           ;
label variable V13534          "L2 STATE FA GREW UP   HD"                 ;
label variable V13542          "L8-9 STATE GREW UP    HD"                 ;
label variable V13635          "REGION 86 HD GREW UP"                     ;
label variable V13636          "HEAD GEOGRAPHIC MOBILITY"                 ;
label variable ER30498         "1986 INTERVIEW NUMBER"                    ;
label variable ER30499         "SEQUENCE NUMBER                       86" ;
label variable ER30500         "RELATIONSHIP TO HEAD                  86" ;
label variable V13701          "RELEASE NUMBER"                           ;
label variable V14581          "L2 STATE FA GREW UP   HD"                 ;
label variable V14589          "L8-9 STATE GREW UP    HD"                 ;
label variable V14682          "REGION 87 HD GREW UP"                     ;
label variable V14683          "HEAD GEOGRAPHIC MOBILITY"                 ;
label variable ER30535         "1987 INTERVIEW NUMBER"                    ;
label variable ER30536         "SEQUENCE NUMBER                       87" ;
label variable ER30537         "RELATIONSHIP TO HEAD                  87" ;
label variable V14801          "RELEASE NUMBER"                           ;
label variable V16055          "L2 STATE FA GREW UP   HD"                 ;
label variable V16063          "L8-9 STATE GREW UP    HD"                 ;
label variable V16156          "REGION 88 HD GREW UP"                     ;
label variable V16157          "HEAD GEOGRAPHIC MOBILITY"                 ;
label variable ER30570         "1988 INTERVIEW NUMBER"                    ;
label variable ER30571         "SEQUENCE NUMBER                       88" ;
label variable ER30572         "RELATION TO HEAD                      88" ;
label variable V16301          "RELEASE NUMBER"                           ;
label variable V17452          "L2 STATE FA GREW UP   HD"                 ;
label variable V17460          "L8-9 STATE GREW UP    HD"                 ;
label variable V17542          "REGION 89 HD GREW UP"                     ;
label variable V17543          "HEAD GEOGRAPHIC MOBILITY"                 ;
label variable ER30606         "1989 INTERVIEW NUMBER"                    ;
label variable ER30607         "SEQUENCE NUMBER                       89" ;
label variable ER30608         "RELATION TO HEAD                      89" ;
label variable V17701          "RELEASE NUMBER"                           ;
label variable V18783          "M2 STATE FA GREW UP   HD"                 ;
label variable V18791          "M8-9 STATE GREW UP    HD"                 ;
label variable V18893          "REGION 90 HD GREW UP"                     ;
label variable V18894          "HEAD GEOGRAPHIC MOBILITY"                 ;
label variable ER30642         "1990 INTERVIEW NUMBER"                    ;
label variable ER30643         "SEQUENCE NUMBER                       90" ;
label variable ER30644         "RELATION TO HEAD                      90" ;
label variable V19001          "RELEASE NUMBER"                           ;
label variable V20083          "L2 STATE FA GREW UP   HD"                 ;
label variable V20091          "L8-9 STATE GREW UP    HD"                 ;
label variable V20193          "REGION 91 HD GREW UP"                     ;
label variable V20194          "HEAD GEOGRAPHIC MOBILITY"                 ;
label variable ER30689         "1991 INTERVIEW NUMBER"                    ;
label variable ER30690         "SEQUENCE NUMBER                       91" ;
label variable ER30691         "RELATION TO HEAD                      91" ;
label variable V20301          "RELEASE NUMBER"                           ;
label variable V21389          "M2 STATE FA GREW UP   HD"                 ;
label variable V21397          "M8-9 STATE GREW UP    HD"                 ;
label variable V21499          "REGION 92 HD GREW UP"                     ;
label variable V21500          "HEAD GEOGRAPHIC MOBILITY"                 ;
label variable ER30733         "1992 INTERVIEW NUMBER"                    ;
label variable ER30734         "SEQUENCE NUMBER                       92" ;
label variable ER30735         "RELATION TO HEAD                      92" ;
label variable V21601          "RELEASE NUMBER"                           ;
label variable V23246          "L2 STATE HD FATHER GREW UP"               ;
label variable V23254          "L8 STATE HD GREW UP"                      ;
label variable V23331          "REGION 1993 HD GREW UP"                   ;
label variable V23332          "HD GEOGRAPHIC MOBILITY"                   ;
label variable ER30806         "1993 INTERVIEW NUMBER"                    ;
label variable ER30807         "SEQUENCE NUMBER                       93" ;
label variable ER30808         "RELATION TO HEAD                      93" ;
label variable ER2001          "RELEASE NUMBER"                           ;
label variable ER3917A         "L2 STATE HD FATHER GREW UP"               ;
label variable ER3919A         "L8 STATE HD GREW UP"                      ;
label variable ER4157C         "REGION HD GREW UP"                        ;
label variable ER4157D         "HD GEOGRAPHIC MOBILITY"                   ;
label variable ER33101         "1994 INTERVIEW NUMBER"                    ;
label variable ER33102         "SEQUENCE NUMBER                       94" ;
label variable ER33103         "RELATION TO HEAD                      94" ;
label variable ER5001          "RELEASE NUMBER"                           ;
label variable ER6787A         "L2 STATE HD FATHER GREW UP"               ;
label variable ER6789A         "L8 STATE HD GREW UP"                      ;
label variable ER6997C         "REGION HD GREW UP"                        ;
label variable ER6997D         "HD GEOGRAPHIC MOBILITY"                   ;
label variable ER33201         "1995 INTERVIEW NUMBER"                    ;
label variable ER33202         "SEQUENCE NUMBER                       95" ;
label variable ER33203         "RELATION TO HEAD                      95" ;
label variable ER7001          "RELEASE NUMBER"                           ;
label variable ER9033A         "L2 STATE HD FATHER GREW UP"               ;
label variable ER9035A         "L8 STATE HD GREW UP"                      ;
label variable ER9248C         "REGION HD GREW UP"                        ;
label variable ER9248D         "HD GEOGRAPHIC MOBILITY"                   ;
label variable ER33301         "1996 INTERVIEW NUMBER"                    ;
label variable ER33302         "SEQUENCE NUMBER                       96" ;
label variable ER33303         "RELATION TO HEAD                      96" ;
label variable ER10001         "RELEASE NUMBER"                           ;
label variable ER11814         "L3/76 ST FTH GREW UP-HD"                  ;
label variable ER11842         "L34A STATE HD GREW UP"                    ;
label variable ER12221C        "REGION HD GREW UP"                        ;
label variable ER12221D        "HD GEOGRAPHIC MOBILITY"                   ;
label variable ER33401         "1997 INTERVIEW NUMBER"                    ;
label variable ER33402         "SEQUENCE NUMBER                       97" ;
label variable ER33403         "RELATION TO HEAD                      97" ;
label variable ER13001         "RELEASE NUMBER"                           ;
label variable ER15892         "L3/76 ST FTH GREW UP-HD"                  ;
label variable ER15922         "L34 STATE HD GREW UP"                     ;
label variable ER16431A        "REGION HD GREW UP"                        ;
label variable ER16431B        "HD GEOGRAPHIC MOBILITY"                   ;
label variable ER33501         "1999 INTERVIEW NUMBER"                    ;
label variable ER33502         "SEQUENCE NUMBER                       99" ;
label variable ER33503         "RELATION TO HEAD                      99" ;
label variable ER17001         "RELEASE NUMBER"                           ;
label variable ER19953         "L3/76 ST FTH GREW UP-HD"                  ;
label variable ER19983         "L34 STATE HD GREW UP"                     ;
label variable ER20377A        "REGION HD GREW UP"                        ;
label variable ER20377B        "HD GEOGRAPHIC MOBILITY"                   ;
label variable ER33601         "2001 INTERVIEW NUMBER"                    ;
label variable ER33602         "SEQUENCE NUMBER                       01" ;
label variable ER33603         "RELATION TO HEAD                      01" ;
label variable ER21001         "RELEASE NUMBER"                           ;
label variable ER23390         "L3/76 ST FTH GREW UP-HD"                  ;
label variable ER23420         "L34A STATE HD GREW UP"                    ;
label variable ER24146         "REGION HD GREW UP"                        ;
label variable ER24147         "HD GEOGRAPHIC MOBILITY"                   ;
label variable ER33701         "2003 INTERVIEW NUMBER"                    ;
label variable ER33702         "SEQUENCE NUMBER                       03" ;
label variable ER33703         "RELATION TO HEAD                      03" ;
label variable ER25001         "RELEASE NUMBER"                           ;
label variable ER27354         "L3 STATE FATHER GREW UP-HD"               ;
label variable ER27386         "L34A STATE WHERE HEAD GREW UP"            ;
label variable ER28045         "REGION HD GREW UP"                        ;
label variable ER28046         "HD GEOGRAPHIC MOBILITY"                   ;
label variable ER33801         "2005 INTERVIEW NUMBER"                    ;
label variable ER33802         "SEQUENCE NUMBER                       05" ;
label variable ER33803         "RELATION TO HEAD                      05" ;
label variable ER36001         "RELEASE NUMBER"                           ;
label variable ER40529         "L3 STATE FATHER GREW UP-HD"               ;
label variable ER40561         "L35 STATE WHERE HEAD GREW UP"             ;
label variable ER41035         "REGION HD GREW UP"                        ;
label variable ER41036         "HD GEOGRAPHIC MOBILITY"                   ;
label variable ER33901         "2007 INTERVIEW NUMBER"                    ;
label variable ER33902         "SEQUENCE NUMBER                       07" ;
label variable ER33903         "RELATION TO HEAD                      07" ;
label variable ER42001         "RELEASE NUMBER"                           ;
label variable ER46506         "L3 STATE FATHER GREW UP-HD"               ;
label variable ER46538         "L35 STATE WHERE HEAD GREW UP"             ;
label variable ER46977         "REGION HD GREW UP"                        ;
label variable ER46978         "HD GEOGRAPHIC MOBILITY"                   ;
label variable ER34001         "2009 INTERVIEW NUMBER"                    ;
label variable ER34002         "SEQUENCE NUMBER                       09" ;
label variable ER34003         "RELATION TO HEAD                      09" ;
label variable ER47301         "RELEASE NUMBER"                           ;
label variable ER51867         "L3 STATE FATHER GREW UP-HD"               ;
label variable ER51899         "L35 STATE WHERE HEAD GREW UP"             ;
label variable ER52401         "REGION HD GREW UP"                        ;
label variable ER52402         "HD GEOGRAPHIC MOBILITY"                   ;
label variable ER34101         "2011 INTERVIEW NUMBER"                    ;
label variable ER34102         "SEQUENCE NUMBER                       11" ;
label variable ER34103         "RELATION TO HEAD                      11" ;
label variable ER53001         "RELEASE NUMBER"                           ;
label variable ER57620         "L3 STATE FATHER GREW UP-HD"               ;
label variable ER57654         "L35 STATE WHERE HEAD GREW UP"             ;
label variable ER58219         "REGION HD GREW UP"                        ;
label variable ER58220         "HD GEOGRAPHIC MOBILITY"                   ;
label variable ER34201         "2013 INTERVIEW NUMBER"                    ;
label variable ER34202         "SEQUENCE NUMBER                       13" ;
label variable ER34203         "RELATION TO HEAD                      13" ;
label variable ER60001         "RELEASE NUMBER"                           ;
label variable ER64771         "L3 STATE FATHER GREW UP-HD"               ;
label variable ER64805         "L35 STATE WHERE HEAD GREW UP"             ;
label variable ER65455         "REGION HD GREW UP"                        ;
label variable ER65456         "HD GEOGRAPHIC MOBILITY"                   ;
label variable ER34301         "2015 INTERVIEW NUMBER"                    ;
label variable ER34302         "SEQUENCE NUMBER                       15" ;
label variable ER34303         "RELATION TO HEAD                      15" ;

#delimit cr

// running psid-provided cleanup
	run ./RawData/geovars_clean_formats.do 

*****************************************
* FIGURE OUT IF R IS A HEAD IN YEAR X *
*****************************************

	lookfor relation
	di "`r(varlist)'"
	local rel1 = "`r(varlist)'" //have to do this so that I can run a foreach loop
	d `rel1'

	foreach rel of local rel1 {
		decode `rel', gen(str`rel') // makes the value labels of the relationship to head vars the var values of the new var
		gen poshead`rel'= ustrpos(str`rel', "Head") //tells me what position "head" is found in. If =1, this tells me R is the head (based on codebook)
		gen label`rel' = "" //creating new string var
		local label: variable label `rel' //storing var label as a local
		replace label`rel' = "`label'" //saves variable label as value of new string var
		split label`rel', gen(label`rel'part) //splits the new var's values into parts
		generate label`rel'yy = real(label`rel'part4) //extracts 2 digit year #s, destrings
	}

	keep ER30000-ER34303 poshead* *yy //gets rid of extraneous vars

*create dummy =1 if R is head in a given year
	foreach y of numlist 68/97 99  {
		
		foreach rel of local rel1 {
		
		tab label`rel'yy, m
		
			if label`rel'yy == `y' {
				gen head19`y' = (poshead`rel'==1) if label`rel'yy==`y'
			}
			else continue
	
		}
	}
	

*create dummy =1 if R is head in a given year
	foreach y of numlist 1(2)15 {
		
		foreach rel of local rel1 {
		local yy : display %02.0f `y'
		
		tab label`rel'yy, m

			if label`rel'yy == `y' {
				gen head20`yy' = (poshead`rel'==1) if label`rel'yy==`y' 
			}
			else continue

		}
	}
	
	egen everhead = rowtotal(head*)
	tab everhead, m //60% of sample is never a head
		
	//decided against dropping neverheads--will be useful to have this info in our main psid dataset for every R
	
	drop poshead* labelER*

*----------------------------------------------------------------------------------------------------------------*
*----------------------------------------------------------------------------------------------------------------*

*********************************************************
// CREATE NEW VARS TO MAKE CODING UP OF GEO VARS EASIER 
*********************************************************

	rename V* v*

//1968 
	foreach var of varlist v311 v362   {
		gen `var'_68 = `var'
	}

//1969
	foreach var of varlist v787 v877 v878  {
		gen `var'_69 = `var'
	}
	
//1970
	foreach var of varlist v1477 v1573 v1574 v1576  {
		gen `var'_70 = `var'
	}

//1971
	foreach var of varlist v2189 v2285 v2286 v2288   {
		gen `var'_71 = `var'
	}

//1972
	foreach var of varlist v2815 v2912 v2913 {
		gen `var'_72 = `var'
	}

//1973
	foreach var of varlist v3233 v3280 v3281 v3283 {
		gen `var'_73 = `var'
	}

//1974
	foreach var of varlist v3655 v3700 v3701 v3703  {
		gen `var'_74 = `var'
	}

//1975
	foreach var of varlist v4131 v4179 v4180 v4182  {
		gen `var'_75 = `var'
	}

//1976
	foreach var of varlist v4674 v5055 v5056 v5058  {
		gen `var'_76 = `var'
	}

//1977
	foreach var of varlist v5594 v5634 v5635 v5637  {
		gen `var'_77 = `var'
	}
	
//1978
	foreach var of varlist v6143 v6181 v6182 v6184  {
		gen `var'_78 = `var'
	}

//1979
	foreach var of varlist v6740 v6774 v6775 v6777  {
		gen `var'_79 = `var'
	}

//1980
	foreach var of varlist v7373 v7420 v7421 v7423  {
		gen `var'_80 = `var'
	}
	
//1981
	foreach var of varlist v8025 v8072 v8073 v8075  {
		gen `var'_81 = `var'
	}

//1982
	foreach var of varlist v8649 v8696 v8697 v8699  {
		gen `var'_82 = `var'
	}

//1983
	foreach var of varlist v9335 v9382 v9383 v9385 {
		gen `var'_83 = `var'
	}
	
//1984
	foreach var of varlist v10982 v11029 v11030 v11032  {
		gen `var'_84 = `var'
	}

//1985
	foreach var of varlist v11915 v12383 v12384 v12386 {
		gen `var'_85 = `var'
	}

//1986
	foreach var of varlist v13534 v13542 v13635 v13636 {
		gen `var'_86 = `var'
	}

//1987
	foreach var of varlist v14581 v14589 v14682 v14683 {
		gen `var'_87 = `var'
	}

//1988
	foreach var of varlist v16055 v16063 v16156 v16157 {
		gen `var'_88 = `var'
	}

//1989
	foreach var of varlist v17452 v17460 v17542 v17543  {
		gen `var'_89 = `var'
	}

//1990
	foreach var of varlist v18783 v18791 v18893 v18894 {
		gen `var'_90 = `var'
	}

//1991
	foreach var of varlist v20083 v20091 v20193 v20194 {
		gen `var'_91 = `var'
	}

//1992
	foreach var of varlist v21389 v21397 v21499 v21500 {
		gen `var'_92 = `var'
	}
	
//1993
	foreach var of varlist v23246 v23254 v23331 v23332 {
		gen `var'_93 = `var'
	}

//1994
	foreach var of varlist ER3917A ER3919A ER4157C ER4157D {
		gen `var'_94 = `var'
	}

//1995
	foreach var of varlist ER6787A ER6789A ER6997C ER6997D  {
		gen `var'_95 = `var'
	}

//1996
	foreach var of varlist ER9033A ER9035A ER9248C ER9248D {
		gen `var'_96 = `var'
	}

//1997
	foreach var of varlist ER11814 ER11842 ER12221C ER12221D {
		gen `var'_97 = `var'
	}

//1999
	foreach var of varlist ER15892 ER15922 ER16431A ER16431B {
		gen `var'_99 = `var'
	}

//2001
	foreach var of varlist ER19953 ER19983 ER20377A ER20377B {
		gen `var'_01 = `var'
	}

//2003
	foreach var of varlist ER23390 ER23420 ER24146 ER24147 {
		gen `var'_03 = `var'
	}

//2005
	foreach var of varlist ER27354 ER27386 ER28045 ER28046 {
		gen `var'_05 = `var'
	}

//2007
	foreach var of varlist ER40529 ER40561 ER41035 ER41036 {
		gen `var'_07 = `var'
	}

//2009
	foreach var of varlist ER46506 ER46538 ER46977 ER46978 {
		gen `var'_09 = `var'
	}

//2011
	foreach var of varlist ER51867 ER51899 ER52401 ER52402 {
		gen `var'_11 = `var'
	}

//2013
	foreach var of varlist ER57620 ER57654 ER58219 ER58220 {
		gen `var'_13 = `var'
	}

//2015
	foreach var of varlist ER64771 ER64805 ER65455 ER65456 {
		gen `var'_15 = `var'
	}

*----------------------------------------------------------------------------------------------------------------*
*----------------------------------------------------------------------------------------------------------------*

*********************************
* HEAD'S GEOMOBILITY IN YEAR X *
*********************************
//note: not available in 1972

//only 1968 coding scheme is different
	gen moved_region1968 = (v363==2) if v363<3 //makes sure that missings stay missing
	tab moved_region1968, m
	
	gen moved_state1968 = (v363==1 | v363==2) if v363<3 //makes sure that missings stay missing
	tab moved_state1968,m 
	
//moved_region and moved_state for 1969-1971 and 1973-1997 and 1999
lookfor geograph
di "`r(varlist)'"
local geomob = "`r(varlist)'"	

//moved_region and moved_state for 1969-1971, 1973-1997, and 1999
	foreach y of numlist 69/71 73/97 99  {
		
		gen moved_region19`y' =.
		gen moved_state19`y' =.
		
		foreach geo of local geomob {
		
		capture noisily: replace moved_region19`y' = (`geo'_`y'==3) if `geo'_`y'<8 
		if _rc~=0 continue
		
		capture noisily: replace moved_state19`y' = (`geo'_`y'==2 | `geo'_`y'==3) if `geo'_`y'<8 
				
		}	
	}

	//1972 
	gen moved_region1972=.
	gen moved_state1972 =. 
	
//moved_region and moved_state for 2001-2015
	
		foreach y of numlist 1(2)15 {
		local yy: display %02.0f `y'
		
		gen moved_region20`yy' =.
		gen moved_state20`yy' =.
		
		foreach geo of local geomob {
		
		capture noisily: replace moved_region20`yy' = (`geo'_`yy'==3) if `geo'_`yy'<8 
		if _rc~=0 continue
		
		capture noisily: replace moved_state20`yy' = (`geo'_`yy'==2 | `geo'_`yy'==3) if `geo'_`yy'<8 
				
		}	
	}

*----------------------------------------------------------------------------------------------------------------*
*----------------------------------------------------------------------------------------------------------------*

*********************************
* WHETHER HEAD IS FOREIGNBORN *
*********************************
//will proxy with region Head grew up in (as suggested by ilyana); available in all years

lookfor "REGION GREW UP" "HD GREW UP" "HD GRW UP"
di "`r(varlist)'"
local hregion = "`r(varlist)'"	

//1968-1997, and 1999
	foreach y of numlist 68/97 99  {
		
		foreach hreg of local hregion {
		
			if "`hreg'" =="v2189" | "`hreg'" =="v2815" | "`hreg'" =="v4131" | "`hreg'" =="v4674" | "`hreg'" =="v5635" | "`hreg'" =="v23254" | "`hreg'" =="ER3919A" | "`hreg'" =="ER6789A" | "`hreg'" =="ER9035A" | "`hreg'" =="ER11842" | "`hreg'" =="ER15922" | "`hreg'" =="ER19983" | "`hreg'" =="ER23420" continue //works
		
			capture noisily: gen foreignborn19`y' = (`hreg'_`y'==6) if `hreg'_`y'<8
			if _rc~=0 continue 
	
			
		}	
	}

//2001-2015

//note: for some reason the if command in the last loop doesn't work well if I try to incorporate it in the one below. Will code up 2001 and 2003 by hand. The rest are fine.

//2001
	gen foreignborn2001 = (ER20377A_01==6) if ER20377A_01<8

//2003
	gen foreignborn2003 = (ER24146_03==6) if ER24146_03<8

//2005-2015
	foreach y of numlist 5(2)15 {
		local yy: display %02.0f `y'
		
		foreach hreg of local hregion {
		
			capture noisily: gen foreignborn20`yy' = (`hreg'_`yy'==6) if `hreg'_`yy'<8
			if _rc~=0 continue 					
		}	
	}

*----------------------------------------------------------------------------------------------------------------*
*----------------------------------------------------------------------------------------------------------------*

******************************************
* WHETHER HEAD'S FATHER IS FOREIGNBORN *
******************************************
//can use region Head's father grew up from 1970-1985. After that have to get this info from "state Head's father grew up"

//fatherforeign unavailable in 1968 + 1969
	gen fatherforeign1968 =.
	gen fatherforeign1969 =.

//1970-1985
	lookfor "RGN FA" "REGION FTH" "REGN DAD" "REGION DAD" "HD FA G"
	di "`r(varlist)'"
	local faregion70_85 = "`r(varlist)'"

	foreach y of numlist 70/85 {
	
		foreach fareg of local faregion70_85 {
		
			capture noisily: gen fatherforeign19`y' = (`fareg'_`y'==6) if `fareg'_`y'<8
			if _rc~=0 continue 			
		}
	}

//1986-1996
//note: can only use code 0--will need to check with ilyana that this is okay
	lookfor "STATE FA GREW" "STATE HD FATHER"
	di "`r(varlist)'"
	local faregion86_99 = "`r(varlist)'"

	foreach y of numlist 86/96 {
	
		foreach faregi of local faregion86_99 {
			
			capture noisily: gen fatherforeign19`y' = (`faregi'_`y'==0) if `faregi'_`y'<99
			if _rc~=0 continue
			}
		}

//1997 + 1999
	gen fatherforeign1997 = (ER11814_97==0) if ER11814_97<99
	gen fatherforeign1999 = (ER15892_99==0) if ER15892_99<99

//2001-2015

//re-labelling some vars so that lookfor will find the vars I want
	foreach var of varlist ER19953 ER23390 {
		label var `var' "L3/76 STA FTH GREW UP-HD"
	}

	lookfor "STA FTH" "STATE FATHER"
	di "`r(varlist)'"
	local faregion01_15 = "`r(varlist)'"
	
	foreach y of numlist 1(2)15 {
	local yy: display %02.0f `y'
	
		foreach far of local faregion01_15 {
			
			capture noisily: gen fatherforeign20`yy' = (`far'_`yy'==0) if `far'_`yy'<99
			if _rc~=0 continue
			}
		}

*----------------------------------------------------------------------------------------------------------------*
*----------------------------------------------------------------------------------------------------------------*

************************
* STATE HEAD GREW UP *
************************
	
//not available in 1968
	gen state_childhood1968 =.

//1969-1996 have the same coding scheme. Will crosswalk with state fips codes
	lookfor "STATE H G" "ST GREW UP-HD" "STATE HD G" "ST HD GREW UP" "STATE GREW UP-HD" "STATE GREW UP HD" "STATE WHERE HEAD" "L8-9 STATE GREW UP" "M8-9 STATE GREW UP"
	di "`r(varlist)'"
	local stchildhood = "`r(varlist)'"

	tempfile temp_geopsid
	save `temp_geopsid', replace

	foreach y of numlist 69/96 {

		foreach stch of local stchildhood {
		
			use `temp_geopsid', clear
	
			if "`stch'" =="ER11842" | "`stch'" =="ER15922" | "`stch'" =="ER19983" | "`stch'" =="ER23420" | "`stch'" =="ER27386" | "`stch'" =="ER40561" | "`stch'" =="ER46538" | "`stch'" =="ER51899" | "`stch'" =="ER57654" | "`stch'" =="ER64805" continue
		
			capture noisily: d `stch'_`y'
			di _rc
			if _rc~=0 continue //this ensures that the right years are looped over the right vars in the stchildhood local
			
			ren `stch'_`y' psidstatecode_`y'
			sort psidstatecode_`y'
			tempfile xwalk_`y'
			save `xwalk_`y''
		
			use "../Crosswalks/psidstatecodes_fipscodes_xwalk.dta", clear	
			ren psidstatecode psidstatecode_`y'
			sort psidstatecode_`y'
			merge 1:m  psidstatecode_`y' using `xwalk_`y''
			tab psidstatecode_`y' if _merge==2, m
			
			drop if _merge==1
			drop _merge 
		
			ren fips state_childhood19`y'
			ren statename statename19`y'	
		
			save `temp_geopsid', replace 
		}
	}	
	
	drop psidstatecode*
	
//1997, 1999, and 2001-2015 are all coded as actual state fips. No need to crosswalk
	lookfor "STATE H G" "ST GREW UP-HD" "STATE HD G" "ST HD GREW UP" "STATE GREW UP-HD" "STATE GREW UP HD" "STATE WHERE HEAD" "L8-9 STATE GREW UP" "M8-9 STATE GREW UP"
	di "`r(varlist)'"
	local stchi = "`r(varlist)'"

	foreach y of numlist 97 99 1(2)15 {
	local yy: display %02.0f `y'
	
		foreach stch of local stchi {
	
			if "`stch'" ~="ER11842" & "`stch'" ~="ER15922" & "`stch'" ~="ER19983" & "`stch'" ~="ER23420" & "`stch'" ~="ER27386" & "`stch'" ~="ER40561" & "`stch'" ~="ER46538" & "`stch'" ~="ER51899" & "`stch'" ~="ER57654" & "`stch'" ~="ER64805" continue
			
			capture noisily: d `stch'_`yy'
			di _rc
			if _rc~=0 continue //this ensures that the right years are looped over the right vars in the stchildhood local

			if `yy' == 97 | `yy' == 99 {
				gen state_childhood19`yy' = `stch'_`yy'
				replace state_childhood19`yy' =. if (state_childhood19`yy'>97 | state_childhood19`yy'==0)
			}
			
			else {
				gen state_childhood20`yy' = `stch'_`yy'
				replace state_childhood20`yy' =. if (state_childhood20`yy'>97 | state_childhood20`yy'==0)
			}
			
		}
	}
	
*----------------------------------------------------------------------------------------------------------------*
*----------------------------------------------------------------------------------------------------------------*

************************
* REGION HEAD GREW UP *
************************
//available in all years

lookfor "REGION GREW UP" "HD GREW UP" "HD GRW UP"
di "`r(varlist)'"
local hregion = "`r(varlist)'"	


//1968-1997, and 1999
	foreach y of numlist 68/97 99  {
		
		foreach hreg of local hregion {
		
			if "`hreg'" =="v2189" | "`hreg'" =="v2815" | "`hreg'" =="v4131" | "`hreg'" =="v4674" | "`hreg'" =="v5635" | "`hreg'" =="v23254" | "`hreg'" =="ER3919A" | "`hreg'" =="ER6789A" | "`hreg'" =="ER9035A" | "`hreg'" =="ER11842" | "`hreg'" =="ER15922" | "`hreg'" =="ER19983" | "`hreg'" =="ER23420" continue //works
		
			capture noisily: gen region4_childhood19`y' = `hreg'_`y'
			if _rc~=0 continue 
	
			replace region4_childhood19`y' = 4 if region4_childhood19`y'==5 //grouping Rs from AK and HI in with "West" (this is done in other surveys)
			replace region4_childhood19`y' =. if region4_childhood19`y'>5 //foreign country/DK/NA	
			
		}	
	}
	
//2001-2015

//note: for some reason the if command in the last loop doesn't work well if I try to incorporate it in the one below. Will code up 2001 and 2003 by hand. The rest are fine.

//2001
	gen region4_childhood2001 = ER20377A_01
	replace region4_childhood2001 = 4 if region4_childhood2001==5 //grouping Rs from AK and HI in with "West" (this is done in other surveys)
	replace region4_childhood2001 =. if region4_childhood2001>5

//2003
	gen region4_childhood2003 = ER24146_03
	replace region4_childhood2003 = 4 if region4_childhood2003==5 //grouping Rs from AK and HI in with "West" (this is done in other surveys)
	replace region4_childhood2003 =. if region4_childhood2003>5

//2005-2015
	foreach y of numlist 5(2)15 {
		local yy: display %02.0f `y'
		
		foreach hreg of local hregion {
		
			capture noisily: gen region4_childhood20`yy' = `hreg'_`yy'
			if _rc~=0 continue 
	
			replace region4_childhood20`yy' = 4 if region4_childhood20`yy'==5 //grouping Rs from AK and HI in with "West" (this is done in other surveys)
			replace region4_childhood20`yy' =. if region4_childhood20`yy'>5
					
		}	
	}

*----------------------------------------------------------------------------------------------------------------*
*----------------------------------------------------------------------------------------------------------------*

// CREATE SON_ID, KEEP PERTINENT VARS, SAVE
	ren ER30001 famid
	ren ER30002 personnumber

	gen son_id = famid*1000 + personnumber
	duplicates report son_id //no dups
	
	keep son_id famid personnumber head* foreignb* fatherf* moved_* state_ch* region4_c* 

	order son_id famid personnumber head* foreignb* fatherf* moved_* state_ch* region4_c*
	label var son_id "Child 1968 ID"
		
	sort son_id 
	compress
	save ./RawData/geopsid, replace

